<?php
/*由bean脚本生成 powerBy--joe*/
namespace app\common\validate;

use app\common\bean\StoreCashBean;

class StoreCashValidate extends BaseValidate
{

	static $all = 'all';
	static $add = 'add';
	static $edit = 'edit';
	static $pkId = 'id';

	public function __construct(array $rules = [], array $message = [], array $field = [])
	{
		parent::__construct($rules, $message, $field);
		$this->rule = [
			 StoreCashBean::$id => 'require', //
			 StoreCashBean::$storeId => 'require', //商家id
			 StoreCashBean::$orderNumber => 'require|max:255', //订单id
			 StoreCashBean::$cashBankName => 'require|max:255', //提现户名
			 StoreCashBean::$cashBankNumber => 'require|max:255', //提现账户
			 StoreCashBean::$cashPrice => 'require', //提现金额，（提现审核结果要更新商家余额）
			 StoreCashBean::$fee => 'require', //手续费
			 StoreCashBean::$rate => 'require', //收取点数
			 StoreCashBean::$status => 'require', //1 审核中，2提现成功，3提现失败
			 StoreCashBean::$memo => 'require|max:255', //备注
			 StoreCashBean::$updatedAt => 'require', //
			 StoreCashBean::$createdAt => 'require', //
		];
		$this->message = [
			StoreCashBean::$id.POINST."require " => 'id必须', //
			StoreCashBean::$storeId.POINST."require " => 'store_id必须', //商家id
			StoreCashBean::$orderNumber.POINST."require " => 'order_number必须', //订单id
			StoreCashBean::$cashBankName.POINST."require " => 'cash_bank_name必须', //提现户名
			StoreCashBean::$cashBankNumber.POINST."require " => 'cash_bank_number必须', //提现账户
			StoreCashBean::$cashPrice.POINST."require " => 'cash_price必须', //提现金额，（提现审核结果要更新商家余额）
			StoreCashBean::$fee.POINST."require " => 'fee必须', //手续费
			StoreCashBean::$rate.POINST."require " => 'rate必须', //收取点数
			StoreCashBean::$status.POINST."require " => 'status必须', //1 审核中，2提现成功，3提现失败
			StoreCashBean::$memo.POINST."require " => 'memo必须', //备注
			StoreCashBean::$updatedAt.POINST."require " => 'updated_at必须', //
			StoreCashBean::$createdAt.POINST."require " => 'created_at必须', //
		];
		$this->scene = [
			self::$all => [
				StoreCashBean::$id,
				StoreCashBean::$storeId,
				StoreCashBean::$orderNumber,
				StoreCashBean::$cashPrice,
				StoreCashBean::$fee,
				StoreCashBean::$rate,
				StoreCashBean::$status,
				StoreCashBean::$memo,
				StoreCashBean::$updatedAt,
				StoreCashBean::$createdAt,
			],
			self::$add => [
			],
			self::$edit => [
                StoreCashBean::$id,
			],
			self::$pkId => [StoreCashBean::$id],
		];
	}


}
